POV-Ray : Newsgroups : povray.general : Possible color bug - request for comment : Re: Possible color bug - request for comment Server Time
3 Aug 2024 16:19:23 EDT (-0400)
  Re: Possible color bug - request for comment  
From: Chris B
Date: 17 Dec 2003 10:44:42
Message: <3fe079ea$1@news.povray.org>
Tom,

The documentation (section 6.1.5.5) does seem  to me to be inconsistent with
the action of povray in this.
(But there are also some problems with your report.)
My findings from a sample scene are slightly different from yours, but when
I code

color My_Color + red 0.5

I get the error "Expected 'Numeric Expression', color keyword 'red' found
instead"
Which I assume is what you are getting.
Whereas the documentation indeed says this should add 0.5 to the red
component of the color.

By contrast, when I tried "color My_Color red 1", it worked fine, replacing
the red component of the color with a value of 1.

There are problems with your report, in that your statement
#declare Foo = ColTest1 blue 1;            --- should read
#declare Foo = color ColTest1 blue 1;
(adding the 'color' key word), otherwise you're trying to do something
undefined with a vector.

I didn't spot the statement
 #declare Foo = ColTest1 ColTest2;
in the documentation anywhere, so I think it's probably reasonable for
Povray to throw an error.

> Any comment as to whether I should post to bugs, docs, or what?
I would wait a day or so, and if no-one says we're both barmy, report a bug
(probably as a documentation error).
I'm not sure what the process is, but you'll need to check it's not already
reported.

Regards,
Chris.

"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3fe02f47$1@news.povray.org...
> Not sure if this is a bug in pov or the docs (or possibly my brain).
>
> The docs (6.1.5.5) say:
>
> "For example...
> color My_Color red 0.5
> this substitutes whatever was the red component of My_Color with a red
component
> of 0.5 however...
> color My_Color + red 0.5
> adds 0.5 to the red component of My_Color"
>
>
> But the following scene-file seems to contradict this:
>
> #version 3.5;
>
> #declare ColTest1 = rgb<1,1,0>;
> #declare ColTest2 = rgb<0,1,1>;
>
> //legal
> #declare Foo = ColTest1 + ColTest2;
>
> //not legal
> #declare Foo = ColTest1 ColTest2;
> #declare Foo = ColTest1 + blue 1;
> #declare Foo = ColTest1 blue 1;
>
> Any comment as to whether I should post to bugs, docs, or what?
>
> --
> #macro
A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
> pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
> end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly
>
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.